const express  = require('express')
const router = express.Router()

// 导入路由处理函数
const userInfo_hander = require('../router_hander/userInfo')
// 导入验证中间件与验证规则
const expressJoi = require('@escook/express-joi')
const {up_userInfo_schema,up_password_schema,up_Avatar} = require('../schema/user')
// 挂载
router.get('/userInfo',userInfo_hander.getUserInfo)
router.post('/userInfo',expressJoi(up_userInfo_schema),userInfo_hander.upUserInfo)
router.post('/updatepwd',expressJoi(up_password_schema),userInfo_hander.upPassword)
router.post('/padate/avatar',expressJoi(up_Avatar),userInfo_hander.upAvatar)
// 导出
module.exports = router